<!DOCTYPE html>
<html style="writing-mode: horizontal-tb">
<style>
h2 { font: bold 100%/1 sans-serif; }
div { border: solid 1em; }
.scroll { border-color: orange; overflow: auto; }
.inline > div { display: inline-block; }
table { border-spacing: 0; }
.flex { display: flex; border: none; align-items: baseline; }
</style>
<section class="inline">
<h2>Last Baseline: Inline Alignment</h2>
 A<div></div>
 B<div class="scroll"></div>
 C<div>x</div>
 D<div class="scroll">X</div>
 E<div>X<div class="scroll">X</div></div>
 F<div>X<div class="scroll"></div></div>
 G<div><div class="scroll">X</div>X</div>
 H<div><div class="scroll"></div>X</div>
 I<div><div class="scroll"></div></div>
</section>

<section>
<h2>First Baseline: Table Row Alignment</h2>
<table>
<tr valign=baseline>
 <td>A<td><div></div>
 <td>B<td><div class="scroll"></div>
 <td>C<td><div>X</div>
 <td>D<td><div class="scroll">X</div>
 <td>E<td><div>X<div class="scroll">X</div></div>
 <td>F<td><div>X<div class="scroll"></div></div>
 <td>G<td><div><div class="scroll">X</div>X</div>
 <td>H<td><div><div class="scroll"></div>X</div>
 <td>I<td><div><div class="scroll"></div></div>
 <td>J<td><div class="scroll">X</div>
 <td>K<td><div class="scroll"></div>X
 <td>L<td><div class="scroll"></div>
</table>
</section>

<section>
<h2>First Baseline: Flex Row Alignment</h2>
<div class="flex">
 A<div></div>
 B<div class="scroll"></div>
 C<div>X</div>
 D<div class="scroll">X</div>
 E<div>X<div class="scroll">X</div></div>
 F<div>X<div class="scroll"></div></div>
 G<div><div class="scroll">X</div>X</div>
 H<div><div class="scroll"></div>X</div>
 I<div><div class="scroll"></div></div>
</div>
